package javase.javase02.networkprograming;

import javase.javase02.networkprograming.TalkReceive;
import javase.javase02.networkprograming.Talks;

/**
 * @author: Gan
 * @date 2021/4/23 0023 22:26
 * @description:定义两个用户
 **/
public class Test {
    public static void main(String[] args) {
        //发送端
        Talks talks = new Talks(3398,"127.0.0.1",6666);
        Thread t1 = new Thread(talks);
        //接收端 本地端口3376，消息来自2号选手
        TalkReceive talkReceive = new TalkReceive(3376, "何志伟");
        Thread t2 = new Thread(talkReceive);
        t1.start();
        t2.start();

    }
}
